import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 牛客网.简单题.数对
 */

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextInt();
        long k = scanner.nextInt();
        long sum = 0;
        if(k == 0){
            System.out.println(n * n);
            return;
        }
        for(long y = k + 1; y < n + 1; y++) {
            sum += (n / y) * (y - k) + Math.max(0,n % y - k + 1);
        }
        System.out.println(sum);
}

public class Test {
}
